package com.mdtx;

import com.mdtx.entity.ClassAttribute;
import com.mdtx.entity.FieldAttribute;
import com.mdtx.write.GenerateCode;
import freemarker.template.TemplateException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.*;

/**
 * 启动
 *
 * @author zhgz
 * @create 2017-07-23 17:35
 **/
@RestController
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class,args);
        try {
            Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://127.0.0.1:10000/summer/create/index");
        } catch (IOException e) {
            System.out.println("打开浏览器失败！");
        }
    }

    @RequestMapping("/")
    public String home(){
        return "代码生成";
    }
}
